#ifndef HTTPDOWNLOADWIDGET_H
#define HTTPDOWNLOADWIDGET_H

#include <QWidget>
#include <QContextMenuEvent>
#include <http.h>
#include <QThreadPool>
#include "ui_downloadbar.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class HttpDownloadWidget;
}
QT_END_NAMESPACE

class HttpDownloadWidget : public QWidget
{
    Q_OBJECT

public:
    HttpDownloadWidget(QWidget *parent = nullptr);
    ~HttpDownloadWidget();

private slots:
    void on_homeBtn_clicked();

    void on_downloadBtn_clicked();
    void contextMenuEvent(QContextMenuEvent* event);
    void downloadFromFileListWidget(const QUrl& url, const QString& filePath);
signals:
    void downloadTask(const QUrl& url, const QString& filePath);

private:
    Ui::HttpDownloadWidget *ui;
};
#endif // HTTPDOWNLOADWIDGET_H
